This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-097780, filed Apr. 5, 1999, the entire contents of which are incorporated herein by reference.
The present invention relates to an object-oriented computer system which distributes a program generated using an object-oriented language to a plurality of computers and operating the program, and a computer-readable storage medium which stores a program.
A distributed program executed by a client/server system is made of a program distributed to a client or server and executed to realize a predetermined function. An example of the distributed program is a program with a program main body provided in a server and a display section provided in a client.
Generally, when a distributed program is to be generated using an object-oriented language, an application program (to be referred to as an xe2x80x9capplicationxe2x80x9d hereinafter. An application is a program having a specific function. Processing itself in executing an application is called a process) is generated by explicitly separating a server-side program and a client-side program at the stage of application generation.
A conventional distributed program generation method will be described in detail. Conventionally, first, an application developer designs contents to be processed by a server-side program, contents to be processed by a client-side program, contents of message exchange between the server program and the client-side program, and a protocol for actually transferring the message exchange contents between the server-side program and the client-side program. In accordance with this design, the application developer develops a program.
However, the above-described development method of separately generating the server-side program and client-side program has the following problems.
As the first problem, to separately generate the server-side program and client-side program at the stage of application generation, the application developer must develop the program consciously of matters such as the operation on the server side, operation on the client side, and synchronization between them.
Thus program development requires labors and is complex in procedure.
As the second problem, to confirm the operation of the developed application, the server-side program and client-side program must be simultaneously operated.
This operation confirmation requires time and labor.
As the third problem, if an error is detected by operation confirmation, it can hardly be traced backed to a bug in the server-side program, a bug in the client-side program, an error in the operation timing between them, or a simple communication error.
It is an object of the present invention to provide an object-oriented computer system with which, in developing a distributed program using an object-oriented language, an application developer can develop the distributed program without being conscious of the discrimination between the server and the client, and a computer-readable storage medium which stores a program.
According to the first aspect of the present invention, there is provided an object-oriented computer system comprising:
a server-side class library which is applied to generate a server-side object which relays a processing request from an application program on a server to a client, the server-side class library being linked to the application program and compatible with an existing library which can be linked to the application program, wherein the application program is an undistributed program being developed by an application developer;
a client-side class library which is applied to generate a client-side object which actually executes processing on the basis of the processing request relayed by the server-side object, the client-side class library inheriting the existing library; and
an object generation section which, when the server-side object is generated by applying the server-side class library and executing the application program, generates the client-side object by applying the client-side class library corresponding to the generated server-side object.
According to this arrangement, when execution of processing is requested from the application to the server-side object, execution of processing is further requested from the server-side object to the client-side object, and actual processing is executed by the client-side object.
When processing requests or various information are exchanged between the server-side object and the client-side object, the operation executed by the server can be partially executed by the client even when the application is not developed as a distributed program.
Hence, processing executed on the server side can be easily distributed.
In addition, in developing a new application which is to be operated upon being distributed, the application developer need only describe an application that operates as a stand-alone application.
The application developer need not design/develop a program being conscious of the discrimination between a server program and a client program. For this reason, the processes and labors in development can be reduced, and the operation can be prevented from becoming complex.
The operation of the object-oriented computer system according to the first aspect of the present invention can be confirmed only by confirming the operation of the application, resulting in a decrease in labors in operation confirmation.
If an error is detected in operation confirmation of the object-oriented computer system according to the first aspect of the present invention, it can easily be traced back to a bug in the application.
According to the second aspect of the present invention, there is provided an object-oriented computer system, in which a server and client are connected through a network, comprising:
a server-side class library which is used to generate a server-side object that transmits a generation request of an object corresponding to the server-side object and executes relay of a processing request to the object corresponding to the server-side object, and which is linked to an application program executed by the server;
a client-side class library which is used to generate a client-side object that executes processing on the basis of the processing request relayed by the server-side object corresponding to the client-side object; and
an object generation section for receiving the generation request transmitted when the server-side object is generated, and generating the client-side object on the basis of the generation request using the client-side class library.
According to this arrangement, in addition to the effects obtained by the object-oriented computer system of the first aspect of the present invention, the server-side object which entrusts processing to the client side and the client-side object which accepts processing entrusted from the server side and executes the processing on the client side correspond in a one-to-one correspondence. Hence, management is facilitated.
According to the third aspect of the present invention, the server-side class library of the first or second aspect is compatible with a predetermined library which can be linked to the application program.
This provides the following effect in addition to the effects obtained by the object-oriented computer system of the first or second aspect of the present invention.
More specifically, in the object-oriented computer system according to the present invention, a server-side class library which has an interface equivalent to an existing library linked to the application and entrusts the actual operation to the client side is provided.
In this arrangement, the operation on the server side having the application can be partially executed on the client side only by simple correction, e.g., linking the server-side class library to the application.
Hence, correction necessary for operating the stand-alone application as a distributed program can be simplified, and labors in program development can be reduced.
According to the fourth aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, which further comprises a distribution section on the server side, which executes processing of sending message contents from the server-side object to the client-side object to the network and processing of acquiring message contents from the client-side object to the server-side object from the network and distributing the message contents to the corresponding server-side object.
This provides the following effect in addition to the effects obtained by the object-oriented computer system of the first or second aspect of the present invention.
More specifically, in the object-oriented computer system according to the present invention, the server-side distribution section sends message contents from the server-side object to the network. In addition, the server-side distribution section acquires message contents from the client-side object from the network.
Messages can be transmitted/received between objects by making only the server-side distribution section visible from the network. In this case, all objects need not always be visible from the network.
Hence, the amount of processing of making the server-side input and output ports for messages exchanged between objects visible from the network can be decreased.
According to the fifth aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, which further comprises a table for managing a server-side object and a client-side object corresponding to the server-side object in association with each other, and a distribution section on the server side, which executes processing of sending message contents from the server-side object to the client-side object to the network and processing of acquiring message contents from the client-side object to the server-side object from the network and distributing the message contents to the corresponding server-side object, on the basis of management contents of the table.
This provides the following effect in addition to the effects obtained by the first or second aspect of the present invention.
Assume that the server-side object and client-side object, which correspond to each other, are assigned the same identifier and managed by the table, and this identifier is appended to message contents exchanged between the objects.
The correspondence between the server-side object and the client-side object can be recognized. For this reason, distribution by the server-side distribution section is facilitated, and management/exclusive processing can be easily executed.
According to the sixth aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, which further comprises a distribution section on the client side, which executes processing of sending message contents from the client-side object to the server-side object to the network and processing of acquiring message contents from the server-side object to the client-side object from the network and distributing the message contents to the corresponding client-side object.
This provides the following effect in addition to the effects obtained by the first or second aspect of the present invention.
In the object-oriented computer system according to the present invention, all objects need not always be visible from the network on the client side.
Hence, the amount of processing of making the client-side input and output ports for messages exchanged between objects visible from the network can be decreased.
According to the seventh aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, which further comprises a table for managing a server-side object and a client-side object corresponding to the server-side object in association with each other, and a distribution section on the client side, which executes processing of sending message contents from the client-side object to the server-side object to the network and processing of acquiring message contents from the server-side object to the client-side object from the network and distributing the message contents to the corresponding client-side object, on the basis of management contents of the table.
According to this arrangement, in addition to the effects obtained by the first or second aspect of the present invention, distribution by the client-side distribution section is facilitated, and management/exclusive processing can be easily executed.
According to the eighth aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, which further comprises a change processing requesting section for notifying, from the client-side object through the network, the server side of only an execution request for processing changed on the server side or processing newly added on the server side.
This provides the following effect in addition to the effects obtained by the first or second aspect of the present invention.
In the object-oriented computer system according to the present invention, a processing execution request is transmitted from the client side to the server side for only processing whose contents are changed between the client and the server by, e.g., inheritance, or new processing added to the server side. For an execution request for another processing, the processing is executed on the client side.
For an event that has occurred on the client side when processing need not be executed on the server side, the processing is executed on the client side.
This prevents an execution request of unnecessary processing from being executed through the network, increases the processing speed, simplifies processing, and prevents heavy load from being imposed on the network.
According to the ninth aspect of the present invention, there is provided an object-oriented computer system of the first or second aspect of the present invention, wherein the client-side class library is generated using a predetermined processing group, and the system further comprises a post-use processing request section for, when one processing of the predetermined processing group is requested in processing by the application program, requesting the client side to execute the requested processing.
As the predetermined processing group used to construct the client-side class library, for example, an existing library can be applied. In addition, when the client-side class library inherits the existing library, the predetermined processing group can be used.
According to this arrangement, in addition to the effects obtained by the first or second aspect of the present invention, the client side can be requested to execute processing executable on the client side. Hence, processing can be distributed.
According to the 10th aspect of the present invention, there is provided an object-oriented computer system of the fourth aspect of the present invention, which further comprises a distribution section on the client side, which executes processing of sending message contents from the client-side object to the server-side object to the network and processing of acquiring message contents from the server-side object to the client-side object from the network and distributing the message contents to the corresponding client-side object.
According to this arrangement, in addition to the effect obtained by the fourth aspect of the present invention, all objects need not always be visible from the network not only on the server side but also on the client side.
Hence, on both the server and client sides, the amount of processing of making the input and output ports for messages exchanged between objects visible from the network can be decreased.
According to the 11th aspect of the present invention, there is provided an object-oriented computer system of the fifth aspect of the present invention, which further comprises a distribution section on the client side, which executes processing of sending message contents from the client-side object to the server-side object to the network and processing of acquiring message contents from the server-side object to the client-side object from the network and distributing the message contents to the corresponding client-side object, on the basis of management contents of the table.
According to this arrangement, in addition to the effect obtained by the fifth aspect of the present invention, distribution by the distribution section is facilitated, and management/exclusive processing can be easily executed even on the client side.
In any one of the object-oriented computer systems of the fourth to 11th aspects, the server-side class library may be compatible with a predetermined library which can be linked to the application program.
The object-oriented computer system of the eighth or ninth aspect may have a server-side distribution section, client-side distribution section, or table.
According to the twelfth aspect of the present invention, there is provided a computer-readable storage medium which stores a program for controlling an object-oriented computer system, comprising:
a server-side class library which is applied to generate a server-side object which relays a processing request from an application program on a server to a client, the server-side class library being linked to the application program and being compatible with an existing library which can be linked to the application program, wherein the application program is an undistributed program being developed by an application developer,
a client-side class library which is applied to generate a client-side object which actually executes processing on the basis of the processing request relayed by the server-side object, the client-side class library inheriting the existing library, and
an object generation section which, when the server-side object is generated by applying the server-side class library by executing the application program, generates the client-side object applying the client-side class library corresponding to the generated server-side object.
When the storage medium which stores the program of the 12th aspect is used, the above-described functions can be easily added to even a computer system without the above-described functions.
The storage medium of the 12th aspect may have a program for implementing the function of a server-side distribution section or a program for implementing the function of a client-side distribution section.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.